D
@thomand1000 Unfortunately I didn't get it entirely fixed, the best theory is that the Eduroam has a UDP timeout feature, I did find a work around that has been working consistently, it gives a maximum of about 30 seconds downtime every 31minutes.
The few things I changed are in the nanogateway.py file for the gateway example:
After 1900 seconds the message "Failed to pull downlink packets from server" would occur so I put a machin.reset() in:
def _pull_data(self):
token = uos.urandom(2)
packet = bytes([PROTOCOL_VERSION]) + token + bytes([PULL_DATA]) + ubinascii.unhexlify(self.id)
with self.udp_lock:
try:
self.sock.sendto(packet, self.server_ip)
except Exception as ex:
machine.reset()
self._log('Failed to pull downlink packets from server: {}', ex)
And every 4-5th restart it would just not connect so I did a simple timer reset in the wifi connection:
def _connect_to_wifi(self):
count = 0
self.wlan.connect(ssid='eduroam', auth=(WLAN.WPA2_ENT, 'Username', 'Password'), identity='Username', timeout = 30)
while not self.wlan.isconnected():
utime.sleep(1)
count = count + 1
print(count)
if count >= 30:
machine.reset()
self._log('WiFi connected to: {}', self.ssid)
Hopefully one day I'll be able to get the UDP timeout thing properly fixed, but they don't change things like this in a hurry for a student haha.